<template>
    <el-card v-if="UserFormData.id" class="info-card" shadow="hover">
            <div class="info-item">
                <span class="label">用户ID：</span>
                <span class="value">{{ UserFormData.id }}</span>
            </div>
            <el-divider />
            <div class="info-item">
                <span class="label">手机号：</span>
                <span class="value">{{ UserFormData.phoneNumber }}</span>
            </div>
            <el-divider />
            <div class="info-item">
                <span class="label">账号：</span>
                <span class="value">{{ UserFormData.userAccountNumber }}</span>
            </div>
            <el-divider />
            <div class="info-item">
                <span class="label">用户名：</span>
                <span class="value">{{ UserFormData.userName }}</span>
            </div>
            <el-divider />
            <div class="info-item">
                <span class="label">用户等级：</span>
                <span class="value">{{ UserFormData.useLevel }}</span>
            </div>
        </el-card>

  </template>
  
  <script setup lang="ts">
  import { ref,onMounted } from 'vue';
  import { userStore } from '@/stores/userInfoStore.js';
  
  const userStoreInfo = userStore();
  
  const UserFormData = userStoreInfo.userInfo;

  
  // 获取用户信息
  // const fetchUserData = async () => {
  //   try {
  //       await api.selectUserInCondition(UserFormData.value.id).then((res) => {
  //           console.log("用户信息", UserFormData.value)
  //           console.log("接收到的用户信息", res)
  //           UserFormData.value = res.data.data.list[0]
  //       })
  //   } catch (error) {
  //       ElMessage.error('用户信息请求异常')
  //       console.error(error)
  //   }
// }

onMounted(() => {
    // fetchUserData()
})

  </script>
  
  <style scoped>
  
  </style>